package com.duobaoyu.dby.supply.common.biz.bo.config;

import com.duobaoyu.dby.supply.common.biz.serializer.BigDecimalSerializer;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * 余额预警配置BO
 * @Author 001
 * @Date 2022/6/7 11:54
 * @Version 1.0
 * @Description
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class BalanceWarnBO implements Serializable {

	private static final long serialVersionUID = 5105348862792158358L;

	/**
	 * 接受短信手机号
	 */
	@ApiModelProperty(value = "接受短信手机号")
	private String phoneNumber;

	/**BalanceWarnVO
	 * 渠道预警信息
	 */
	@ApiModelProperty(value = "渠道预警信息")
	private List<BalanceWarnInfo> data;

	@Data
	@Builder
	@NoArgsConstructor
	@AllArgsConstructor
	public static class BalanceWarnInfo{

		@ApiModelProperty(value = "主键id")
		private Long id;

		/**
		 * 功能是否开启 0：未开启  1：开启
		 */
		@ApiModelProperty(value = "功能是否开启 0：未开启  1：开启")
		private Boolean enable;

		/**
		 * 预警金额(单位分)
		 */
		@ApiModelProperty(value = "预警金额(单位分)")
		@JsonSerialize(using = BigDecimalSerializer.class)
		private BigDecimal warnAmount;

		/**
		 * 三方渠道
		 */
		@ApiModelProperty(value = "三方渠道")
		private String channelCode;

		/**
		 * 三方渠道名称
		 */
		@ApiModelProperty(value = "三方渠道名称")
		private String channelName;
	}

}
